// 必填
export const required = {
  required: true,
  message: "此项为必填项",
  trigger: ["blur", "change"],
};
// 手機號碼驗證
export function validatePhone(aaa, value, callback) {
  let reg = /^1[34578]\d{9}$/;
  if (value == "" || value == undefined || value == null) {
    callback();
  } else {
    if (!reg.test(value)) {
      callback(new Error("手機號碼格式錯誤"));
    } else {
      callback();
    }
  }
}
